package game.metalmax.factory
{
	import game.metalmax.module.server.Header;
	import game.metalmax.module.world.Header;
	import game.metalmax.packet.server.EnterGameResponse;
	import game.metalmax.packet.server.LoginResponse;
	import game.metalmax.packet.world.EnterSceneResponse;
	import game.metalmax.packet.world.TransferOffResponse;

	public final class PacketFactory
	{
		static public function getPacket(header:int):Object
		{
			switch (header) 
			{
				case game.metalmax.module.server.Header.LOGIN_GAME_S2C:
				{
					return new LoginResponse();
				}
				case game.metalmax.module.server.Header.ENTER_GAME_S2C:
				{
					return new EnterGameResponse();
				}
				case game.metalmax.module.world.Header.ENTER_SCENE_S2C:
				{
					return new EnterSceneResponse();
				}
				case game.metalmax.module.world.Header.TRANSFER_OFF_S2C:
				{
					return new TransferOffResponse();
				}
				default:
				{
					return null;
				}
			}
		
		}
		
		
	}
}